package de.jmda.mproc.swingui;

import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import de.jmda.util.fileset.DirectoryFileFilter;
import de.jmda.util.fileset.FileSetJavaFilesOnly;

/**
 *
 */
public class ListModelSourcesRootDirectoriesExcludes extends ListModelJavaSourceFiles
{
	private static final long serialVersionUID = -6674887614997062530L;

	public ListModelSourcesRootDirectoriesExcludes(FileSetJavaFilesOnly fileSetSources)
	{
		super(fileSetSources);

		Set<DirectoryFileFilter> directoryFilters =
				super.fileSetSources.getExcludeDirectoryFiltersRecursive();
	
		List<File> fileList = new ArrayList<File>();
		
		for (DirectoryFileFilter directoryFilter : directoryFilters)
		{
			fileList.add(directoryFilter.getDirectory());
		}

		files = fileList.toArray(new File[0]);
	}
}